package cn.fenqing168.springcloud.controller;

import cn.fenqing168.springcloud.commons.BaseResult;
import cn.fenqing168.springcloud.entities.Payment;
import cn.fenqing168.springcloud.service.PaymentFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController
public class OrderController {

    @Autowired
    private PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/payment/get/{id}")
    public BaseResult<Payment> get(@PathVariable Long id){
        return paymentFeignService.getById(id);
    }

    @GetMapping("/consumer/payment/feign/timeout")
    public String timeout(){
        return paymentFeignService.paymentFeignTimeout();
    }

}
